package cn.lg.basic.util;

/**
 * @Description: 删除，修改，添加的返回值类型，定义了成功和失败的两种返回结果
 * @Author: lg
 * @Version: 1.0
 * @Date:  2022/4/22 13:10
 */
public class AjaxResult {

    public Boolean success = true;

    public String message = "操作成功!!!";

    public static AjaxResult me(){
        return new AjaxResult();
    };

    /**
     * 链式编程思维
     * @param success
     */
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }
}
